<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<title>Insert title here</title>

</head>
<body>
	<script type="text/javascript" src="/js/calendar.js"></script>
	<link rel="stylesheet" type="text/css" href="/css/calendar.css">
	<div class="content-wrapper">
		<#include "/head.ftl"/>
		<div class="z-box">
			<div class="tab-header">
				<a title="返回" class="btn btn-setting" onclick="back(this)"> <i
					class="iconfont icon-undo"></i>
				</a> <a title="刷新" class="btn btn-setting" onclick="refresh(this)">
					<i class="iconfont icon-refresh"></i>
				</a>
			</div>
			<div class="z-box-body">
			<div style="width: 1010px;margin: 0 auto;">
				<ul class="form-list">
					<li class="form-item"><label class="item-title"> <span
							class="font-red">*</span> 
					<#if id?exists>
							<span class="pbian" data-id="${id}">标题:</span>
					<#else>
							<span class="pbian" data-id="0">标题:</span>
					</#if>
							
					</label>
					<#if title?exists>
							<input class="item-input titles" placeholder="日程标题" value="${title}">
					<#else>
							<input class="item-input titles" placeholder="日程标题" >
					</#if>
					</li>
					<li class="form-item">
						<label class="item-title">
							<span class="state-x" data-xuan="0">状态:</span>
						</label>
						<span class="state commonly" data-xuan="0">一般</span> 
						<span class="state important" data-xuan="1">重要</span>
						<span class="state urgent" data-xuan="2">紧急</span></li>
					<li class="form-item">
						<div style="display: inline-block;">
							<label class="item-title"><span>开始时间:</span></label> 
							<#if start?exists>
							 <input
								value="${start}" id="start" class="item-input shi" type="text"
								onfocus="WdatePicker(
								{startDate:'%y-%M-%d 00:00:00',
									dateFmt:'yyyy-MM-dd HH:mm:ss',
									onpicked:function(){  },
									maxDate:'#F{$dp.$D(\'end\')}'})"  />
							<#else>
							<input
								 id="start" class="item-input shi" type="text"
								onfocus="WdatePicker(
								{startDate:'%y-%M-%d 00:00:00',
									dateFmt:'yyyy-MM-dd HH:mm:ss',
									onpicked:function(){  },
									maxDate:'#F{$dp.$D(\'end\')}'})"  /></#if>
						</div>
						<div style="display: inline-block;">
							<label class="item-title"><span>结束时间:</span></label>
							<#if end?exists>
							 <input
								value="${end}" id="end" class="item-input shi" type="text"
								onfocus="WdatePicker(
								{startDate:'%y-%M-%d 00:00:00',
									dateFmt:'yyyy-MM-dd HH:mm:ss',
									onpicked:function(){  },
									minDate:'#F{$dp.$D(\'start\')}'})" />
							<#else>
							<input
								value="" id="end" class="item-input shi" type="text"
								onfocus="WdatePicker(
								{startDate:'%y-%M-%d 00:00:00',
									dateFmt:'yyyy-MM-dd HH:mm:ss',
									onpicked:function(){  },
									minDate:'#F{$dp.$D(\'start\')}'})" /></#if>
							 
						</div>
					</li>
					<li class="form-item"></li>
					<li class="form-item"><label class="item-title"> <span>参与人:</span>
					</label>
						<div class="item-input person-user">
						<#if sm?exists && sm.users?size gt 0>
						<#list sm.users as we>
							<#if we.id==sm.smSendUserId>
							<span data-id="${sm.smSendUserId}" class="thisid zi">${userinfo.realName}(发布者)</span>
							<#else>
							<span data-id="${we.id}" class="thisid">${we.realName}<i class="iconfont icon-chuyidong chal"></i></span>
							</#if>
						</#list>
						<#else>
							<span data-id="${userinfo.id}" class="thisid zi">${userinfo.realName}(自己)</span>
						</#if>
							<!-- 选择日程参与人 -->
						</div>
						<div class="person-add" data-zid="${userinfo.id}">
							<i class="iconfont icon-jiahao"></i>
						</div></li>
					<li class="form-item"><label class="item-title"> <span>是否提醒:</span>
					</label>
						<div class="text-input-wrap" data-remind="0"></div></li>
					<li class="form-item"><label class="item-title"> <span>内容:</span>
					</label> <textarea class="zhu-text"></textarea></li>
				</ul>
				<div class="modal-footer">
					<#if id?exists>
						<a class="btn-confirm" data-id="${id}">保存</a> 
					<#else>
						<a class="btn-confirm" data-id="0">保存</a> 
					</#if>
					<a class="btn-cancel" onclick="quxiao(this)">取消</a>
				</div>
				</div>
			</div>
		</div>
		
		<div class="usersa" style="display: none;">
		<div class="tab-content">
			<div>
			<table style="width: 100%; border-collapse: collapse; background: #fff;">
				<thead>
				<tr>
					<th>选择</th>
					<th>姓名</th>
					<th>部门</th>
					<th>职位</th>
				</tr>
				</thead>
				<tbody>
				<#list users as user>
					<tr>
						<td><div data-name="${user.realName}" data-id="${user.id}" class="text-input-wrap" data-remind="0"></td>
						<td>${user.realName}</td>
						<td>${user.dept.name}</td>
						<td>${user.deptOffice.name}</td>
					</tr>
					</#list>
					</tbody>
				</table>
				</div>
			</div>
		</div>
	</div>
</body>
</html>